Command-line Package Installation
You can use the command-line tool InstallPackage.exe to install one or more software packages on an end user's computer.
This method is useful for allowing end users to install packages on their own computers as well. Simply provide a link or command on a user's desktop that can be directly executed whenever the software is needed or if one of a limited number of licenses becomes available.
There are two prerequisites before using this tool:
•You need to copy the InstallPackage.exe file to the local NetInst directory of the client computer. InstallPackage.exe is located on the depot (root directory).
•A Shop Policy must be available for each package to be installed, and it must be assigned to a computer or computer group. After executing the Install command, a Shop Policy instance will be created, and the software will be installed.
Via a command line on the client computer, you can also retrieve a log file containing the list of packages available for installation.
To retrieve a log file containing the package list
At a command-line prompt, type:
C:\Program Files\NetInst>InstallPackage.exe
This action creates a log file containing the list of packages available for installation. The log file is stored in the C:\Program Files\Common Files\enteo\NiLogs folder and has the prefix InstallPackage_.
The log file will contain a package list that looks similar to the following (package IDs are in bold):
SyncGetSoftwareList returned: 0
{
"Items":{
"{0A60BC9B-533C-40DE-BF60-390F4CF431CC}":{
"AllowedActions":{
"Install":true
},
"Assigned":false,
"Description":"",
"EstimatedInstallTime":0,
"ExecutionMode":"None",
"FileSetInfo":{
"id":"972",
"repository":"master",
"rev":"r1"
},
"Name":"TestMSG",
"RolloutState":"NotInstalled",
"Schema":"eScriptPackage",
"ShowOnTopLevel":true
},
"{889ADB1C-F659-4074-86B4-6E6F7072B3D9}":{
"AllowedActions":{
"Install":true
},
"Assigned":false,
"Description":"",
"EstimatedInstallTime":0,
"ExecutionMode":"None",
"FileSetInfo":{
"id":"982",
"repository":"master",
"rev":"r1"
},
"Name":"SecondMSG",
"RolloutState":"NotInstalled",
"Schema":"eScriptPackage",
"ShowOnTopLevel":true
}
},
"Schemas":{
"Object":"Base",
"Software":"Object",
"SwPackage":"Software",
"UniversalScriptPackage":"SwPackage",
"eScriptPackage":"UniversalScriptPackage"
}
}
To install packages via the command line
To install the entire package list, at a command-line prompt, type:
C:\Program Files\NetInst>InstallPackage.exe Install All
To install specific packages, type:
C:\Program Files\NetInst>InstallPackage.exe Install Package1,Package2
Package1 and Package2 are the package IDs, not the package names. Package IDs are located in the log file.
In either case, the Install command will call the installer niinst32. After a successful installation, the DSM Software Shop will show that the packages were downloaded to the assigned computer(s).
After installation, the updated log file will list other possible command-line options—Uninstall, Repair, and Reinstall.